﻿using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using CarFrameWork.Common;
namespace CarFrameWork.Model.CanShuHua
{
	/// <summary>
	/// 类通气塞。
	/// </summary>
	[Serializable]
	public partial class 通气塞
	{
		public 通气塞()
		{}
		#region Model
		private int _id;
		private string _name;
		private string _path;
		private float _l1;
		private float _l2;
		private float _l3;
		private float _l4;
		private float _l5;
		private float _l6;
		private float _l7;
		private float _l8;
		private float _l9;
		private float _l10;
		private float _h;
		private float _d1;
		private float _d2;
		private float _d3;
		private float _d4;
		private float _d5;
		private float _d6;
		private float _d7;
		private float _d8;
		private float _d9;
		private float _r1;
		private float _r2;
		/// <summary>
		/// 
		/// </summary>
		public int ID
		{
			set{ _id=value;}
			get{return _id;}
		}
		/// <summary>
		/// 
		/// </summary>
		public string name
		{
			set{ _name=value;}
			get{return _name;}
		}
		/// <summary>
		/// 
		/// </summary>
		public string path
		{
			set{ _path=value;}
			get{return _path;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float L1
		{
			set{ _l1=value;}
			get{return _l1;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float L2
		{
			set{ _l2=value;}
			get{return _l2;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float L3
		{
			set{ _l3=value;}
			get{return _l3;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float L4
		{
			set{ _l4=value;}
			get{return _l4;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float L5
		{
			set{ _l5=value;}
			get{return _l5;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float L6
		{
			set{ _l6=value;}
			get{return _l6;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float L7
		{
			set{ _l7=value;}
			get{return _l7;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float L8
		{
			set{ _l8=value;}
			get{return _l8;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float L9
		{
			set{ _l9=value;}
			get{return _l9;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float L10
		{
			set{ _l10=value;}
			get{return _l10;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float H
		{
			set{ _h=value;}
			get{return _h;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float D1
		{
			set{ _d1=value;}
			get{return _d1;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float D2
		{
			set{ _d2=value;}
			get{return _d2;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float D3
		{
			set{ _d3=value;}
			get{return _d3;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float D4
		{
			set{ _d4=value;}
			get{return _d4;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float D5
		{
			set{ _d5=value;}
			get{return _d5;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float D6
		{
			set{ _d6=value;}
			get{return _d6;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float D7
		{
			set{ _d7=value;}
			get{return _d7;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float D8
		{
			set{ _d8=value;}
			get{return _d8;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float D9
		{
			set{ _d9=value;}
			get{return _d9;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float R1
		{
			set{ _r1=value;}
			get{return _r1;}
		}
		/// <summary>
		/// 
		/// </summary>
		public float R2
		{
			set{ _r2=value;}
			get{return _r2;}
		}
		#endregion Model


		#region  Method

		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public 通气塞(int ID)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select ID,name,path,L1,L2,L3,L4,L5,L6,L7,L8,L9,L10,H,D1,D2,D3,D4,D5,D6,D7,D8,D9,R1,R2 ");
			strSql.Append(" FROM [通气塞] ");
			strSql.Append(" where ID=@ID ");
			SqlParameter[] parameters = {
					new SqlParameter("@ID", SqlDbType.Int,4)};
			parameters[0].Value = ID;

			DataSet ds=DbHelperSQL.Query(strSql.ToString(),parameters);
			if(ds.Tables[0].Rows.Count>0)
			{
				if(ds.Tables[0].Rows[0]["ID"]!=null && ds.Tables[0].Rows[0]["ID"].ToString()!="")
				{
					this.ID=int.Parse(ds.Tables[0].Rows[0]["ID"].ToString());
				}
				if(ds.Tables[0].Rows[0]["name"]!=null && ds.Tables[0].Rows[0]["name"].ToString()!="")
				{
					this.name=ds.Tables[0].Rows[0]["name"].ToString();
				}
				if(ds.Tables[0].Rows[0]["path"]!=null && ds.Tables[0].Rows[0]["path"].ToString()!="")
				{
					this.path=ds.Tables[0].Rows[0]["path"].ToString();
				}
				if(ds.Tables[0].Rows[0]["L1"]!=null && ds.Tables[0].Rows[0]["L1"].ToString()!="")
				{
					this.L1=float.Parse(ds.Tables[0].Rows[0]["L1"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L2"]!=null && ds.Tables[0].Rows[0]["L2"].ToString()!="")
				{
					this.L2=float.Parse(ds.Tables[0].Rows[0]["L2"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L3"]!=null && ds.Tables[0].Rows[0]["L3"].ToString()!="")
				{
					this.L3=float.Parse(ds.Tables[0].Rows[0]["L3"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L4"]!=null && ds.Tables[0].Rows[0]["L4"].ToString()!="")
				{
					this.L4=float.Parse(ds.Tables[0].Rows[0]["L4"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L5"]!=null && ds.Tables[0].Rows[0]["L5"].ToString()!="")
				{
					this.L5=float.Parse(ds.Tables[0].Rows[0]["L5"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L6"]!=null && ds.Tables[0].Rows[0]["L6"].ToString()!="")
				{
					this.L6=float.Parse(ds.Tables[0].Rows[0]["L6"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L7"]!=null && ds.Tables[0].Rows[0]["L7"].ToString()!="")
				{
					this.L7=float.Parse(ds.Tables[0].Rows[0]["L7"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L8"]!=null && ds.Tables[0].Rows[0]["L8"].ToString()!="")
				{
					this.L8=float.Parse(ds.Tables[0].Rows[0]["L8"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L9"]!=null && ds.Tables[0].Rows[0]["L9"].ToString()!="")
				{
					this.L9=float.Parse(ds.Tables[0].Rows[0]["L9"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L10"]!=null && ds.Tables[0].Rows[0]["L10"].ToString()!="")
				{
					this.L10=float.Parse(ds.Tables[0].Rows[0]["L10"].ToString());
				}
				if(ds.Tables[0].Rows[0]["H"]!=null && ds.Tables[0].Rows[0]["H"].ToString()!="")
				{
					this.H=float.Parse(ds.Tables[0].Rows[0]["H"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D1"]!=null && ds.Tables[0].Rows[0]["D1"].ToString()!="")
				{
					this.D1=float.Parse(ds.Tables[0].Rows[0]["D1"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D2"]!=null && ds.Tables[0].Rows[0]["D2"].ToString()!="")
				{
					this.D2=float.Parse(ds.Tables[0].Rows[0]["D2"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D3"]!=null && ds.Tables[0].Rows[0]["D3"].ToString()!="")
				{
					this.D3=float.Parse(ds.Tables[0].Rows[0]["D3"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D4"]!=null && ds.Tables[0].Rows[0]["D4"].ToString()!="")
				{
					this.D4=float.Parse(ds.Tables[0].Rows[0]["D4"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D5"]!=null && ds.Tables[0].Rows[0]["D5"].ToString()!="")
				{
					this.D5=float.Parse(ds.Tables[0].Rows[0]["D5"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D6"]!=null && ds.Tables[0].Rows[0]["D6"].ToString()!="")
				{
					this.D6=float.Parse(ds.Tables[0].Rows[0]["D6"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D7"]!=null && ds.Tables[0].Rows[0]["D7"].ToString()!="")
				{
					this.D7=float.Parse(ds.Tables[0].Rows[0]["D7"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D8"]!=null && ds.Tables[0].Rows[0]["D8"].ToString()!="")
				{
					this.D8=float.Parse(ds.Tables[0].Rows[0]["D8"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D9"]!=null && ds.Tables[0].Rows[0]["D9"].ToString()!="")
				{
					this.D9=float.Parse(ds.Tables[0].Rows[0]["D9"].ToString());
				}
				if(ds.Tables[0].Rows[0]["R1"]!=null && ds.Tables[0].Rows[0]["R1"].ToString()!="")
				{
					this.R1=float.Parse(ds.Tables[0].Rows[0]["R1"].ToString());
				}
				if(ds.Tables[0].Rows[0]["R2"]!=null && ds.Tables[0].Rows[0]["R2"].ToString()!="")
				{
					this.R2=float.Parse(ds.Tables[0].Rows[0]["R2"].ToString());
				}
			}
		}

		/// <summary>
		/// 得到最大ID
		/// </summary>
		public int GetMaxId()
		{

		return DbHelperSQL.GetMaxID("ID", "通气塞"); 
		}

		/// <summary>
		/// 是否存在该记录
		/// </summary>
		public bool Exists(int ID)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select count(1) from [通气塞]");
			strSql.Append(" where ID=@ID ");

			SqlParameter[] parameters = {
					new SqlParameter("@ID", SqlDbType.Int,4)};
			parameters[0].Value = ID;

			return DbHelperSQL.Exists(strSql.ToString(),parameters);
		}


		/// <summary>
		/// 增加一条数据
		/// </summary>
		public int Add()
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("insert into [通气塞] (");
			strSql.Append("name,path,L1,L2,L3,L4,L5,L6,L7,L8,L9,L10,H,D1,D2,D3,D4,D5,D6,D7,D8,D9,R1,R2)");
			strSql.Append(" values (");
			strSql.Append("@name,@path,@L1,@L2,@L3,@L4,@L5,@L6,@L7,@L8,@L9,@L10,@H,@D1,@D2,@D3,@D4,@D5,@D6,@D7,@D8,@D9,@R1,@R2)");
			strSql.Append(";select @@IDENTITY");
			SqlParameter[] parameters = {
					new SqlParameter("@name", SqlDbType.NVarChar,50),
					new SqlParameter("@path", SqlDbType.NVarChar),
					new SqlParameter("@L1", SqlDbType.Float,8),
					new SqlParameter("@L2", SqlDbType.Float,8),
					new SqlParameter("@L3", SqlDbType.Float,8),
					new SqlParameter("@L4", SqlDbType.Float,8),
					new SqlParameter("@L5", SqlDbType.Float,8),
					new SqlParameter("@L6", SqlDbType.Float,8),
					new SqlParameter("@L7", SqlDbType.Float,8),
					new SqlParameter("@L8", SqlDbType.Float,8),
					new SqlParameter("@L9", SqlDbType.Float,8),
					new SqlParameter("@L10", SqlDbType.Float,8),
					new SqlParameter("@H", SqlDbType.Float,8),
					new SqlParameter("@D1", SqlDbType.Float,8),
					new SqlParameter("@D2", SqlDbType.Float,8),
					new SqlParameter("@D3", SqlDbType.Float,8),
					new SqlParameter("@D4", SqlDbType.Float,8),
					new SqlParameter("@D5", SqlDbType.Float,8),
					new SqlParameter("@D6", SqlDbType.Float,8),
					new SqlParameter("@D7", SqlDbType.Float,8),
					new SqlParameter("@D8", SqlDbType.Float,8),
					new SqlParameter("@D9", SqlDbType.Float,8),
					new SqlParameter("@R1", SqlDbType.Float,8),
					new SqlParameter("@R2", SqlDbType.Float,8)};
			parameters[0].Value = name;
			parameters[1].Value = path;
			parameters[2].Value = L1;
			parameters[3].Value = L2;
			parameters[4].Value = L3;
			parameters[5].Value = L4;
			parameters[6].Value = L5;
			parameters[7].Value = L6;
			parameters[8].Value = L7;
			parameters[9].Value = L8;
			parameters[10].Value = L9;
			parameters[11].Value = L10;
			parameters[12].Value = H;
			parameters[13].Value = D1;
			parameters[14].Value = D2;
			parameters[15].Value = D3;
			parameters[16].Value = D4;
			parameters[17].Value = D5;
			parameters[18].Value = D6;
			parameters[19].Value = D7;
			parameters[20].Value = D8;
			parameters[21].Value = D9;
			parameters[22].Value = R1;
			parameters[23].Value = R2;

			object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
			if (obj == null)
			{
				return 0;
			}
			else
			{
				return Convert.ToInt32(obj);
			}
		}
		/// <summary>
		/// 更新一条数据
		/// </summary>
		public bool Update()
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("update [通气塞] set ");
			strSql.Append("name=@name,");
			strSql.Append("path=@path,");
			strSql.Append("L1=@L1,");
			strSql.Append("L2=@L2,");
			strSql.Append("L3=@L3,");
			strSql.Append("L4=@L4,");
			strSql.Append("L5=@L5,");
			strSql.Append("L6=@L6,");
			strSql.Append("L7=@L7,");
			strSql.Append("L8=@L8,");
			strSql.Append("L9=@L9,");
			strSql.Append("L10=@L10,");
			strSql.Append("H=@H,");
			strSql.Append("D1=@D1,");
			strSql.Append("D2=@D2,");
			strSql.Append("D3=@D3,");
			strSql.Append("D4=@D4,");
			strSql.Append("D5=@D5,");
			strSql.Append("D6=@D6,");
			strSql.Append("D7=@D7,");
			strSql.Append("D8=@D8,");
			strSql.Append("D9=@D9,");
			strSql.Append("R1=@R1,");
			strSql.Append("R2=@R2");
			strSql.Append(" where ID=@ID ");
			SqlParameter[] parameters = {
					new SqlParameter("@name", SqlDbType.NVarChar,50),
					new SqlParameter("@path", SqlDbType.NVarChar),
					new SqlParameter("@L1", SqlDbType.Float,8),
					new SqlParameter("@L2", SqlDbType.Float,8),
					new SqlParameter("@L3", SqlDbType.Float,8),
					new SqlParameter("@L4", SqlDbType.Float,8),
					new SqlParameter("@L5", SqlDbType.Float,8),
					new SqlParameter("@L6", SqlDbType.Float,8),
					new SqlParameter("@L7", SqlDbType.Float,8),
					new SqlParameter("@L8", SqlDbType.Float,8),
					new SqlParameter("@L9", SqlDbType.Float,8),
					new SqlParameter("@L10", SqlDbType.Float,8),
					new SqlParameter("@H", SqlDbType.Float,8),
					new SqlParameter("@D1", SqlDbType.Float,8),
					new SqlParameter("@D2", SqlDbType.Float,8),
					new SqlParameter("@D3", SqlDbType.Float,8),
					new SqlParameter("@D4", SqlDbType.Float,8),
					new SqlParameter("@D5", SqlDbType.Float,8),
					new SqlParameter("@D6", SqlDbType.Float,8),
					new SqlParameter("@D7", SqlDbType.Float,8),
					new SqlParameter("@D8", SqlDbType.Float,8),
					new SqlParameter("@D9", SqlDbType.Float,8),
					new SqlParameter("@R1", SqlDbType.Float,8),
					new SqlParameter("@R2", SqlDbType.Float,8),
					new SqlParameter("@ID", SqlDbType.Int,4)};
			parameters[0].Value = name;
			parameters[1].Value = path;
			parameters[2].Value = L1;
			parameters[3].Value = L2;
			parameters[4].Value = L3;
			parameters[5].Value = L4;
			parameters[6].Value = L5;
			parameters[7].Value = L6;
			parameters[8].Value = L7;
			parameters[9].Value = L8;
			parameters[10].Value = L9;
			parameters[11].Value = L10;
			parameters[12].Value = H;
			parameters[13].Value = D1;
			parameters[14].Value = D2;
			parameters[15].Value = D3;
			parameters[16].Value = D4;
			parameters[17].Value = D5;
			parameters[18].Value = D6;
			parameters[19].Value = D7;
			parameters[20].Value = D8;
			parameters[21].Value = D9;
			parameters[22].Value = R1;
			parameters[23].Value = R2;
			parameters[24].Value = ID;

			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}

		/// <summary>
		/// 删除一条数据
		/// </summary>
		public bool Delete(int ID)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("delete from [通气塞] ");
			strSql.Append(" where ID=@ID ");
			SqlParameter[] parameters = {
					new SqlParameter("@ID", SqlDbType.Int,4)};
			parameters[0].Value = ID;

			int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
			if (rows > 0)
			{
				return true;
			}
			else
			{
				return false;
			}
		}


		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		public void GetModel(int ID)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select ID,name,path,L1,L2,L3,L4,L5,L6,L7,L8,L9,L10,H,D1,D2,D3,D4,D5,D6,D7,D8,D9,R1,R2 ");
			strSql.Append(" FROM [通气塞] ");
			strSql.Append(" where ID=@ID ");
			SqlParameter[] parameters = {
					new SqlParameter("@ID", SqlDbType.Int,4)};
			parameters[0].Value = ID;

			DataSet ds=DbHelperSQL.Query(strSql.ToString(),parameters);
			if(ds.Tables[0].Rows.Count>0)
			{
				if(ds.Tables[0].Rows[0]["ID"]!=null && ds.Tables[0].Rows[0]["ID"].ToString()!="")
				{
					this.ID=int.Parse(ds.Tables[0].Rows[0]["ID"].ToString());
				}
				if(ds.Tables[0].Rows[0]["name"]!=null && ds.Tables[0].Rows[0]["name"].ToString()!="")
				{
					this.name=ds.Tables[0].Rows[0]["name"].ToString();
				}
				if(ds.Tables[0].Rows[0]["path"]!=null && ds.Tables[0].Rows[0]["path"].ToString()!="")
				{
					this.path=ds.Tables[0].Rows[0]["path"].ToString();
				}
				if(ds.Tables[0].Rows[0]["L1"]!=null && ds.Tables[0].Rows[0]["L1"].ToString()!="")
				{
					this.L1=float.Parse(ds.Tables[0].Rows[0]["L1"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L2"]!=null && ds.Tables[0].Rows[0]["L2"].ToString()!="")
				{
					this.L2=float.Parse(ds.Tables[0].Rows[0]["L2"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L3"]!=null && ds.Tables[0].Rows[0]["L3"].ToString()!="")
				{
					this.L3=float.Parse(ds.Tables[0].Rows[0]["L3"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L4"]!=null && ds.Tables[0].Rows[0]["L4"].ToString()!="")
				{
					this.L4=float.Parse(ds.Tables[0].Rows[0]["L4"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L5"]!=null && ds.Tables[0].Rows[0]["L5"].ToString()!="")
				{
					this.L5=float.Parse(ds.Tables[0].Rows[0]["L5"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L6"]!=null && ds.Tables[0].Rows[0]["L6"].ToString()!="")
				{
					this.L6=float.Parse(ds.Tables[0].Rows[0]["L6"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L7"]!=null && ds.Tables[0].Rows[0]["L7"].ToString()!="")
				{
					this.L7=float.Parse(ds.Tables[0].Rows[0]["L7"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L8"]!=null && ds.Tables[0].Rows[0]["L8"].ToString()!="")
				{
					this.L8=float.Parse(ds.Tables[0].Rows[0]["L8"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L9"]!=null && ds.Tables[0].Rows[0]["L9"].ToString()!="")
				{
					this.L9=float.Parse(ds.Tables[0].Rows[0]["L9"].ToString());
				}
				if(ds.Tables[0].Rows[0]["L10"]!=null && ds.Tables[0].Rows[0]["L10"].ToString()!="")
				{
					this.L10=float.Parse(ds.Tables[0].Rows[0]["L10"].ToString());
				}
				if(ds.Tables[0].Rows[0]["H"]!=null && ds.Tables[0].Rows[0]["H"].ToString()!="")
				{
					this.H=float.Parse(ds.Tables[0].Rows[0]["H"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D1"]!=null && ds.Tables[0].Rows[0]["D1"].ToString()!="")
				{
					this.D1=float.Parse(ds.Tables[0].Rows[0]["D1"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D2"]!=null && ds.Tables[0].Rows[0]["D2"].ToString()!="")
				{
					this.D2=float.Parse(ds.Tables[0].Rows[0]["D2"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D3"]!=null && ds.Tables[0].Rows[0]["D3"].ToString()!="")
				{
					this.D3=float.Parse(ds.Tables[0].Rows[0]["D3"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D4"]!=null && ds.Tables[0].Rows[0]["D4"].ToString()!="")
				{
					this.D4=float.Parse(ds.Tables[0].Rows[0]["D4"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D5"]!=null && ds.Tables[0].Rows[0]["D5"].ToString()!="")
				{
					this.D5=float.Parse(ds.Tables[0].Rows[0]["D5"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D6"]!=null && ds.Tables[0].Rows[0]["D6"].ToString()!="")
				{
					this.D6=float.Parse(ds.Tables[0].Rows[0]["D6"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D7"]!=null && ds.Tables[0].Rows[0]["D7"].ToString()!="")
				{
					this.D7=float.Parse(ds.Tables[0].Rows[0]["D7"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D8"]!=null && ds.Tables[0].Rows[0]["D8"].ToString()!="")
				{
					this.D8=float.Parse(ds.Tables[0].Rows[0]["D8"].ToString());
				}
				if(ds.Tables[0].Rows[0]["D9"]!=null && ds.Tables[0].Rows[0]["D9"].ToString()!="")
				{
					this.D9=float.Parse(ds.Tables[0].Rows[0]["D9"].ToString());
				}
				if(ds.Tables[0].Rows[0]["R1"]!=null && ds.Tables[0].Rows[0]["R1"].ToString()!="")
				{
					this.R1=float.Parse(ds.Tables[0].Rows[0]["R1"].ToString());
				}
				if(ds.Tables[0].Rows[0]["R2"]!=null && ds.Tables[0].Rows[0]["R2"].ToString()!="")
				{
					this.R2=float.Parse(ds.Tables[0].Rows[0]["R2"].ToString());
				}
			}
		}

		/// <summary>
		/// 获得数据列表
		/// </summary>
		public DataSet GetList(string strWhere)
		{
			StringBuilder strSql=new StringBuilder();
			strSql.Append("select * ");
			strSql.Append(" FROM [通气塞] ");
			if(strWhere.Trim()!="")
			{
				strSql.Append(" where "+strWhere);
			}
			return DbHelperSQL.Query(strSql.ToString());
		}

		#endregion  Method
	}
}

